
# end to end test for ChessBoard

__author__ = 'ronan and darren'

import unittest
from ChessBoard import ChessBoard

class TestEnd2End(unittest.TestCase):

    def setUp(self):
        self.board = ChessBoard()
	self.board.resetBoard()
	self.f = open('moves.txt', 'r')

    def tearDown(self):
        pass

    def testRun(self):
	moves = []

	for line in self.f:
    	    moves.extend((line.rstrip()).split(" "))

	for move in moves:
    	    self.board.printBoard()
    	    print self.board.addTextMove(move)

	self.board.printBoard()
#	self.board.printBoardSingleRow()

def main():
        try:
            t = TestEnd2End()
        except Exception as e:
            print "Error " + e.message


if __name__ == "__main__":
    unittest.main()
